In [1]:
2+1
Out[1]:
In [3]:
2-1
Out[3]:
In [5]:
3/2
Out[5]:
Modulo or 'Mod' operator
In [6]:
7 / 4
Out[6]:
In [7]:
7%4
Out[7]:
Note the remainder compared to the float.
In [8]:
50 % 5
Out[8]:
Returns 0 because it is evenly distributed without a remainder.
In [9]:
2 ** 3
Out[9]:
In [10]:
2+10*10+3
Out[10]:
In [11]:
(2+10)*(10+3)
Out[11]:
In [ ]: